package com.itany.dao;

import com.itanty.maven.dao.entity.User;
import com.itanty.maven.dao.entity.UserParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @date 2025/9/18
 */
public interface UserDao {
    void insertUser(User user);

    User selectById(Integer id);

    List<User> selectAll();

    void updateUser(User user);

    void deleteById(Integer id);

    /**
     * 向t_user2中插入一条数据
     * @param user
     */
    void insertUser2(User user);

    /**
     * 查询t_user2表中的所有数据
     * @return
     */
    List<User> selectAll2();

    List<User> selectAll3();

    List<User> selectByPhone(String phone);
    List<User> selectByPhone2(String phone);

    List<User> selectByParams(UserParam userParam);

    User selectByUsernameAndPassword3(@Param("username") String username, @Param("password") String password);

    List<User> selectByUsernameAndPassword4(@Param("username") String username,@Param("password") String password);
}
